<!DOCTYPE html>
<html lang="en">
<head>
    
    <meta charset="utf-8">
    <title>packages/my-chart-bar/Bar.js - Documentation</title>
    
    
    <script src="scripts/prettify/prettify.js"></script>
    <script src="scripts/prettify/lang-css.js"></script>
    <link type="text/css" rel="stylesheet" href="styles/prettify.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
    <script src="scripts/nav.js" defer></script>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>

<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger" class="navicon-button x">
  <div class="navicon"></div>
</label>

<label for="nav-trigger" class="overlay"></label>

<nav >
    
    <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-$ui_charts_my-chart.html">$ui/charts/my-chart</a></li></ul><h3>Global</h3><ul><li><a href="global.html#baseSeries">baseSeries</a></li><li><a href="global.html#columnsToStandard">columnsToStandard</a></li><li><a href="global.html#createAxis">createAxis</a></li><li><a href="global.html#createDataset">createDataset</a></li><li><a href="global.html#createDimensions">createDimensions</a></li><li><a href="global.html#createPieSeries">createPieSeries</a></li><li><a href="global.html#createSeries">createSeries</a></li><li><a href="global.html#createSource">createSource</a></li><li><a href="global.html#DEFAULT_THEME">DEFAULT_THEME</a></li><li><a href="global.html#formatValue">formatValue</a></li><li><a href="global.html#getDataByLevel">getDataByLevel</a></li><li><a href="global.html#getLabelConfig">getLabelConfig</a></li><li><a href="global.html#getLabelFormatter">getLabelFormatter</a></li><li><a href="global.html#getLevelPieRadius">getLevelPieRadius</a></li><li><a href="global.html#getLimitRows">getLimitRows</a></li><li><a href="global.html#getNeedTransformColumnIndexes">getNeedTransformColumnIndexes</a></li><li><a href="global.html#getStackName">getStackName</a></li><li><a href="global.html#injectLabel">injectLabel</a></li><li><a href="global.html#PIE_LABEL_LINE">PIE_LABEL_LINE</a></li><li><a href="global.html#PIE_ROSE_ITEM_STYLE">PIE_ROSE_ITEM_STYLE</a></li><li><a href="global.html#props">props</a></li><li><a href="global.html#SERIES_LABEL_POSITION">SERIES_LABEL_POSITION</a></li><li><a href="global.html#transformData">transformData</a></li></ul>
</nav>

<div id="main">
    
    <h1 class="page-title">packages/my-chart-bar/Bar.js</h1>
    

    



    
    <section>
        <article>
            <pre class="prettyprint source linenums"><code>import cartesian2d from '$ui/charts/utils/cartesian2d'

/**
 * 组件私有参数
 * @property {object} settings 柱状图配置参数
 * @property {string} [settings.direction=x] 排列方向，即类目在哪个轴上，可选：x、y
 * @property {string|object|array} [label] 数据项的标签设置，字符类型设置position， 对象与原生series.label设置一致
 * @property {string|object|array} [valueAxis] 值类型轴配置, 字符串设置名称，对象与echarts xAxis、yAxis配置项一致，数组和设置多个轴
 * @property {Object|String[]} [stack] 堆叠柱，如 ['name1', 'name2']  或  {'name': ['name1', 'name2']}
 * @property {boolean|number} [smooth=0.5] 线条平滑，只对折线图有效
 */
export const props = {
  // 排列方向，即类别在哪个轴上
  direction: {
    type: String,
    default: 'x',
    validator(val) {
      return ['x', 'y'].includes(val)
    }
  },
  // 数据项的标签设置，字符类型设置position， 对象与原生series.label设置一致
  label: [String, Object, Array],
  
  // 值类型轴配置
  valueAxis: [String, Object, Array],
  
  // 堆叠柱，如 ['name1', 'name2']  或  {'name': ['name1', 'name2']}
  stack: [Object, Array],
  
  // 改成线条显示的系列
  lines: [String, Array],
  
  // 线条平滑，只对折线图有效
  smooth: {
    type: [Boolean, Number],
    default: 0.5
  }
  
  
}


export default function (vm) {
  return cartesian2d(vm, 'bar', props)
}
</code></pre>
        </article>
    </section>





    
</div>

<br class="clear">

<footer>
    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.5</a> on Thu Sep 17 2020 14:48:37 GMT+0800 (GMT+08:00) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
<script src="scripts/polyfill.js"></script>
<script src="scripts/linenumber.js"></script>




<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?c4e5f73318b5cb0c389e3d9a05f831cc";
  var s = document.getElementsByTagName("script")[0];
  s.parentNode.insertBefore(hm, s);
})();
</script>

</body>
</html>
